<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title></title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport"
          content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <link rel="stylesheet" href="/layuiadmin/layui/css/layui.css" media="all">
    <link rel="stylesheet" href="/layuiadmin/style/admin.css" media="all">
</head>
<body>

<div class="layui-fluid">
    <div class="layui-card">
        <div class="layui-tab layui-tab-brief">
            <ul class="layui-tab-title layui_tab_title">
                <li class="layui-this"><a href="{:url('user/backpack',array('uid'=>$uid))}">背包情况</a></li>
                <li class=""><a href="{:url('order/user_order',array('uid'=>$uid))}">充值记录</a></li>
                <li class=""><a href="{:url('gift/user_send',array('uid'=>$uid))}">送礼记录</a></li>
                <li class=""><a href="{:url('charge/manual',array('uid'=>$uid))}">人工上分</a></li>
            </ul>
        </div>

        <div class="layui-form layui-card-header layuiadmin-card-header-auto">
            <div class="layui-form-item">
                <div class="layui-btn-group" id="btnGroup">
                    <a class="layui-btn {$type==0?'':'layui-btn-primary'}" href="{:url('user/backpack',array('uid'=>$uid))}">收费礼物</a>
                    <a class="layui-btn {$type==1?'':'layui-btn-primary'}" href="{:url('user/backpack',array('uid'=>$uid,'type'=>1))}">免费礼物</a>
                </div>
            </div>
        </div>

        <div class="layui-card-body">
            <table id="LAY-user-apply" lay-filter="LAY-user-apply"></table>
        </div>
    </div>
</div>

<script src="/layuiadmin/layui/layui.js"></script>
<script>
    layui.config({
        base: '/layuiadmin/' //静态资源所在路径
        , version: "{:config('other.ui_version')}"
    }).extend({
        index: 'lib/index' //主入口模块
    }).use(['index', 'table'], function () {
        var $ = layui.$
            , table = layui.table

        table.render({
            elem: '#LAY-user-apply'
            , url: "{:url('user/getBackpackList',array('uid'=>$uid,'type'=>$type))}"
            , cols: [[
                {field: 'id', width: 80, title: 'ID'},
                {field: 'title', title: '礼物名称'},
                {field: 'count', title: '礼物数量',},
                {field: 'price', title: '礼物价格/元',},
            ]]
            , page: true
            , limit: 20
            , height: 'full-180'
            , text: '对不起，加载出现异常！'
            , even: true
        });

    });
</script>
</body>
</html>
